home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / RTLWIN32.PAK / EXCHEXT.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  31KB  |  802 lines

  1. #ifndef EXCHEXT_H
  2. #define EXCHEXT_H
  3. #pragma option -b
  4.  
  5.  
  6. /*
  7.  *  E X C H E X T . H
  8.  *
  9.  *  Declarations of interfaces for providers of Microsoft Exchange
  10.  *  client extensions.
  11.  *
  12.  *  Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
  13.  */
  14.  
  15.  
  16. #ifndef BEGIN_INTERFACE
  17. #define BEGIN_INTERFACE
  18. #endif
  19.  
  20. #ifdef __BORLANDC__
  21. #pragma option -b.
  22.   #include <pshpack8.h>
  23. #pragma option -b
  24. #endif
  25.  
  26. /*
  27.  *  C o n s t a n t s
  28.  */
  29.  
  30.  
  31. // SCODEs
  32. #define EXCHEXT_S_NOCRITERIA    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 1)
  33. #define EXCHEXT_S_NOCHANGE      MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 2)
  34.  
  35. // Flag for Unicode strings
  36. #define EXCHEXT_UNICODE                 (0x80000000)
  37.  
  38. // Flag values for IExchExtCallback::GetVersion
  39. #define EECBGV_GETBUILDVERSION          (0x00000001)
  40. #define EECBGV_GETACTUALVERSION         (0x00000002)
  41. #define EECBGV_GETVIRTUALVERSION        (0x00000004)
  42.  
  43. // Build version value for IExchExtCallback::GetVersion
  44. #define EECBGV_BUILDVERSION_MAJOR       (0x000d0000)
  45. #define EECBGV_BUILDVERSION_MAJOR_MASK  (0xFFFF0000)
  46. #define EECBGV_BUILDVERSION_MINOR_MASK  (0x0000FFFF)
  47.  
  48. // Actual/Virtual version values for IExchExtCallback::GetVersion
  49. #define EECBGV_MSEXCHANGE_WIN31         (0x01010000)
  50. #define EECBGV_MSEXCHANGE_WIN95         (0x01020000)
  51. #define EECBGV_MSEXCHANGE_WINNT         (0x01030000)
  52. #define EECBGV_MSEXCHANGE_MAC           (0x01040000)
  53. #define EECBGV_VERSION_PRODUCT_MASK     (0xFF000000)
  54. #define EECBGV_VERSION_PLATFORM_MASK    (0x00FF0000)
  55. #define EECBGV_VERSION_MAJOR_MASK       (0x0000FF00)
  56. #define EECBGV_VERSION_MINOR_MASK       (0x000000FF)
  57.  
  58. // Flag values for IExchExtCallback::GetMenuPos
  59. #define EECBGMP_RANGE                   (0x00000001)
  60.  
  61. // Flag values for IExchExtCallback::GetNewMessageSite
  62. #define EECBGNMS_MODAL                  (0x00000001)
  63.  
  64. // Flag values for IExchExtCallback::ChooseFolder
  65. #define EECBCF_GETNAME                  (0x00000001)
  66. #define EECBCF_HIDENEW                  (0x00000002)
  67. #define EECBCF_PREVENTROOT              (0x00000004)
  68.  
  69. // Extensibility contexts used with IExchExt::Install
  70. #define EECONTEXT_SESSION               (0x00000001)
  71. #define EECONTEXT_VIEWER                (0x00000002)
  72. #define EECONTEXT_REMOTEVIEWER          (0x00000003)
  73. #define EECONTEXT_SEARCHVIEWER          (0x00000004)
  74. #define EECONTEXT_ADDRBOOK              (0x00000005)
  75. #define EECONTEXT_SENDNOTEMESSAGE       (0x00000006)
  76. #define EECONTEXT_READNOTEMESSAGE       (0x00000007)
  77. #define EECONTEXT_SENDPOSTMESSAGE       (0x00000008)
  78. #define EECONTEXT_READPOSTMESSAGE       (0x00000009)
  79. #define EECONTEXT_READREPORTMESSAGE     (0x0000000A)
  80. #define EECONTEXT_SENDRESENDMESSAGE     (0x0000000B)
  81. #define EECONTEXT_PROPERTYSHEETS        (0x0000000C)
  82. #define EECONTEXT_ADVANCEDCRITERIA      (0x0000000D)
  83. #define EECONTEXT_TASK                  (0x0000000E)
  84.  
  85. // Flag values for IExchExt::Install
  86. #define EE_MODAL                        (0x00000001)
  87.  
  88. // Toolbar ids used with IExchExtCommands::InstallCommands
  89. #define EETBID_STANDARD                 (0x00000001)
  90.  
  91. // Flag values for IExchExtCommands::QueryHelpText
  92. #define EECQHT_STATUS                   (0x00000001)
  93. #define EECQHT_TOOLTIP                  (0x00000002)
  94.  
  95. // Flag values for IExchExtMessageEvents::OnXComplete
  96. #define EEME_FAILED                     (0x00000001)
  97. #define EEME_COMPLETE_FAILED            (0x00000002)
  98.  
  99. // Flag values for IExchExtAttachedFileEvents::OpenSzFile
  100. #define EEAFE_OPEN                      (0x00000001)
  101. #define EEAFE_PRINT                     (0x00000002)
  102. #define EEAFE_QUICKVIEW                 (0x00000003)
  103.  
  104. // Flag values for IExchExtPropertySheets methods
  105. #define EEPS_MESSAGE                    (0x00000001)
  106. #define EEPS_FOLDER                     (0x00000002)
  107. #define EEPS_STORE                      (0x00000003)
  108. #define EEPS_TOOLSOPTIONS               (0x00000004)
  109.  
  110. // Flag values for IExchExtAdvancedCriteria::Install and ::SetFolder
  111. #define EEAC_INCLUDESUBFOLDERS          (0x00000001)
  112.  
  113.  
  114. /*
  115.  *  S t r u c t u r e s
  116.  */
  117.  
  118.  
  119. // Hook procedure for IExchExtCallback::ChooseFolder
  120. typedef UINT (STDAPICALLTYPE FAR * LPEECFHOOKPROC)(HWND, UINT, WPARAM, LPARAM);
  121.  
  122. // Dialog information for IExchExtCallback::ChooseFolder
  123. typedef struct
  124. {
  125.     UINT cbLength;
  126.     HWND hwnd;
  127.     LPTSTR szCaption;
  128.     LPTSTR szLabel;
  129.     LPTSTR szHelpFile;
  130.     ULONG ulHelpID;
  131.     HINSTANCE hinst;
  132.     UINT uiDlgID;
  133.     LPEECFHOOKPROC lpeecfhp;
  134.     DWORD dwHookData;
  135.     ULONG ulFlags;
  136.     LPMDB pmdb;
  137.     LPMAPIFOLDER pfld;
  138.     LPTSTR szName;
  139.     DWORD dwReserved1;
  140.     DWORD dwReserved2;
  141.     DWORD dwReserved3;
  142. }
  143. EXCHEXTCHOOSEFOLDER, FAR * LPEXCHEXTCHOOSEFOLDER;
  144.  
  145. // Toolbar list entries for IExchExtCommands::InstallCommands
  146. typedef struct
  147. {
  148.     HWND hwnd;
  149.     ULONG tbid;
  150.     ULONG ulFlags;
  151.     UINT itbbBase;
  152. }
  153. TBENTRY, FAR * LPTBENTRY;
  154.  
  155.  
  156. /*
  157.  *  E x t e r n a l   T y p e s
  158.  */
  159.  
  160.  
  161. // Property sheet pages from Windows 95 prsht.h
  162. #ifndef _PRSHT_H_
  163. typedef struct _PROPSHEETPAGE;
  164. typedef struct _PROPSHEETPAGE FAR * LPPROPSHEETPAGE;
  165. #endif
  166.  
  167. // Toolbar adjust info from Windows 95 commctrl.h
  168. #ifndef _INC_COMMCTRL
  169. typedef struct _TBBUTTON;
  170. typedef struct _TBBUTTON FAR * LPTBBUTTON;
  171. #endif
  172.  
  173.  
  174. /*
  175.  *  S u p p o r t   I n t e r f a c e s
  176.  */
  177.  
  178.  
  179. // Forward reference
  180. #ifdef __cplusplus
  181. interface IExchExtModeless;
  182. #else
  183. typedef interface IExchExtModeless IExchExtModeless;
  184. #endif 
  185. typedef IExchExtModeless FAR* LPEXCHEXTMODELESS;
  186.  
  187.  
  188. /*
  189.  *  IExchExtModelessCallback
  190.  *
  191.  *  Purpose:
  192.  *      Interface which may be used by Exchange client
  193.  *      extensions that create modeless UI.
  194.  */
  195. #undef INTERFACE
  196. #define INTERFACE   IExchExtModelessCallback
  197. DECLARE_INTERFACE_(IExchExtModelessCallback, IUnknown)
  198. {
  199.     BEGIN_INTERFACE
  200.  
  201.     // *** IUnknown methods ***
  202.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  203.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  204.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  205.   
  206.     // *** IExchExtModelessCallback methods ***
  207.     STDMETHOD(EnableModeless) (THIS_ HWND hwnd, BOOL fEnable) PURE;
  208.     STDMETHOD(AddWindow) (THIS) PURE;
  209.     STDMETHOD(ReleaseWindow) (THIS) PURE;
  210. };
  211. typedef IExchExtModelessCallback FAR * LPEXCHEXTMODELESSCALLBACK;
  212.  
  213.  
  214. /*
  215.  *  IExchExtCallback
  216.  *
  217.  *  Purpose:
  218.  *      Resource interface that may be used by Exchange client extensions.
  219.  */
  220. #undef INTERFACE
  221. #define INTERFACE   IExchExtCallback
  222.  
  223. DECLARE_INTERFACE_(IExchExtCallback, IUnknown)
  224. {
  225.     BEGIN_INTERFACE
  226.  
  227.     // *** IUnknown methods ***
  228.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  229.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  230.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  231.  
  232.     // *** IExchExtCallback methods ***
  233.     STDMETHOD(GetVersion) (THIS_ ULONG FAR * lpulVersion, ULONG ulFlags) PURE;
  234.     STDMETHOD(GetWindow) (THIS_ HWND FAR * lphwnd) PURE;
  235.     STDMETHOD(GetMenu) (THIS_ HMENU FAR * lphmenu) PURE;
  236.     STDMETHOD(GetToolbar) (THIS_ ULONG tbid, HWND FAR * lphwndTb) PURE;
  237.     STDMETHOD(GetSession) (THIS_ LPMAPISESSION FAR * lppses, 
  238.                            LPADRBOOK FAR * lppab) PURE;
  239.     STDMETHOD(GetObject) (THIS_ LPMDB FAR * lppmdb, 
  240.                           LPMAPIPROP FAR * lppmp) PURE;
  241.     STDMETHOD(GetSelectionCount) (THIS_ ULONG FAR * lpceid) PURE;
  242.     STDMETHOD(GetSelectionItem) (THIS_ ULONG ieid, ULONG FAR * lpcbEid,
  243.                                  LPENTRYID FAR * lppeid, ULONG FAR * lpulType,
  244.                                  LPTSTR lpszMsgClass, ULONG cbMsgClass,
  245.                                  ULONG FAR * lpulMsgFlags, ULONG ulFlags) PURE;
  246.     STDMETHOD(GetMenuPos) (THIS_ ULONG cmdid, HMENU FAR * lphmenu,
  247.                            ULONG FAR * lpmposMin, ULONG FAR * lpmposMax,
  248.                            ULONG ulFlags) PURE;
  249.     STDMETHOD(GetSharedExtsDir) (THIS_ LPTSTR lpszDir, ULONG cchDir, 
  250.                                  ULONG ulFlags) PURE;
  251.     STDMETHOD(GetRecipients) (THIS_ LPADRLIST FAR * lppal) PURE;
  252.     STDMETHOD(SetRecipients) (THIS_ LPADRLIST lpal) PURE;
  253.     STDMETHOD(GetNewMessageSite) (THIS_ ULONG fComposeInFolder,
  254.                                   LPMAPIFOLDER pfldFocus,
  255.                                   LPPERSISTMESSAGE ppermsg,
  256.                                   LPMESSAGE FAR * ppmsg,
  257.                                   LPMAPIMESSAGESITE FAR * ppmms,
  258.                                   LPMAPIVIEWCONTEXT FAR * ppmvc,
  259.                                   ULONG ulFlags) PURE;
  260.     STDMETHOD(RegisterModeless) (THIS_ LPEXCHEXTMODELESS peem,
  261.                                  LPEXCHEXTMODELESSCALLBACK FAR * ppeemcb) PURE;
  262.     STDMETHOD(ChooseFolder) (THIS_ LPEXCHEXTCHOOSEFOLDER peecf) PURE;
  263. };
  264. typedef IExchExtCallback FAR * LPEXCHEXTCALLBACK;
  265.  
  266.  
  267. /*
  268.  *  E x t e n s i o n   I n t e r f a c e s
  269.  */
  270.  
  271.  
  272. /*
  273.  *  IExchExt
  274.  *
  275.  *  Purpose:
  276.  *      Central interface implemented by Exchange client extensions.
  277.  */
  278. #undef INTERFACE
  279. #define INTERFACE   IExchExt
  280.  
  281. DECLARE_INTERFACE_(IExchExt, IUnknown)
  282. {
  283.     BEGIN_INTERFACE
  284.  
  285.     // *** IUnknown methods ***
  286.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  287.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  288.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  289.  
  290.     // *** IExchExt methods ***
  291.     STDMETHOD(Install) (THIS_ LPEXCHEXTCALLBACK lpeecb, 
  292.                         ULONG mecontext, ULONG ulFlags) PURE;
  293. };
  294. typedef IExchExt FAR * LPEXCHEXT;
  295.  
  296. // Type of function called by the client to load an extension
  297. typedef LPEXCHEXT (CALLBACK * LPFNEXCHEXTENTRY)(VOID);
  298.  
  299.  
  300. /*
  301.  *  IExchExtCommands
  302.  *
  303.  *  Purpose:
  304.  *      Interface implemented by Exchange client extensions that wish to
  305.  *      add additional commands to the client's menus.
  306.  */
  307. #undef INTERFACE
  308. #define INTERFACE   IExchExtCommands
  309.  
  310. DECLARE_INTERFACE_(IExchExtCommands, IUnknown)
  311. {
  312.     BEGIN_INTERFACE
  313.  
  314.     // *** IUnknown methods ***
  315.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  316.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  317.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  318.  
  319.     // *** IExchExtCommands methods ***
  320.     STDMETHOD(InstallCommands) (THIS_ LPEXCHEXTCALLBACK lpeecb, HWND hwnd, 
  321.                                 HMENU hmenu, UINT FAR * lpcmdidBase, 
  322.                                 LPTBENTRY lptbeArray, UINT ctbe, 
  323.                                 ULONG ulFlags) PURE;
  324.     STDMETHOD_(VOID,InitMenu) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  325.     STDMETHOD(DoCommand) (THIS_ LPEXCHEXTCALLBACK lpeecb, UINT cmdid) PURE;
  326.     STDMETHOD(Help) (THIS_ LPEXCHEXTCALLBACK lpeecb, UINT cmdid) PURE;
  327.     STDMETHOD(QueryHelpText) (THIS_ UINT cmdid, ULONG ulFlags,
  328.                               LPTSTR lpsz, UINT cch) PURE;
  329.     STDMETHOD(QueryButtonInfo) (THIS_ ULONG tbid, UINT itbb, LPTBBUTTON ptbb,
  330.                                 LPTSTR lpsz, UINT cch, ULONG ulFlags) PURE;
  331.     STDMETHOD(ResetToolbar) (THIS_ ULONG tbid, ULONG ulFlags) PURE;
  332. };
  333. typedef IExchExtCommands FAR * LPEXCHEXTCOMMANDS;
  334.  
  335.  
  336. /*
  337.  *  IExchExtUserEvents
  338.  *
  339.  *  Purpose:
  340.  *      Interface implemented by Exchange client extensions that wish to
  341.  *      take special action when the user does certain actions.
  342.  */
  343. #undef INTERFACE
  344. #define INTERFACE   IExchExtUserEvents
  345.  
  346. DECLARE_INTERFACE_(IExchExtUserEvents, IUnknown)
  347. {
  348.     BEGIN_INTERFACE
  349.  
  350.     // *** IUnknown methods ***
  351.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  352.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  353.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  354.  
  355.     // *** IExchExtUserEvents methods ***
  356.     STDMETHOD_(VOID,OnSelectionChange) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  357.     STDMETHOD_(VOID,OnObjectChange) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  358. };
  359. typedef IExchExtUserEvents FAR * LPEXCHEXTUSEREVENTS;
  360.  
  361.  
  362. /*
  363.  *  IExchExtSessionEvents
  364.  *
  365.  *  Purpose:
  366.  *      Interface implemented by Exchange client extensions that wish to
  367.  *      take special action when certain events happen in the session.
  368.  */
  369. #undef INTERFACE
  370. #define INTERFACE   IExchExtSessionEvents
  371.  
  372. DECLARE_INTERFACE_(IExchExtSessionEvents, IUnknown)
  373. {
  374.     BEGIN_INTERFACE
  375.  
  376.     // *** IUnknown methods ***
  377.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  378.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  379.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  380.  
  381.     // *** IExchExtEvents methods ***
  382.     STDMETHOD(OnDelivery)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  383. };
  384. typedef IExchExtSessionEvents FAR * LPEXCHEXTSESSIONEVENTS;
  385.  
  386.  
  387. /*
  388.  *  IExchExtMessageEvents
  389.  *
  390.  *  Purpose:
  391.  *      Interface implemented by Exchange client extensions that wish to
  392.  *      take special action when certain events happen to messages.
  393.  */
  394. #undef INTERFACE
  395. #define INTERFACE   IExchExtMessageEvents
  396.  
  397. DECLARE_INTERFACE_(IExchExtMessageEvents, IUnknown)
  398. {
  399.     BEGIN_INTERFACE
  400.  
  401.     // *** IUnknown methods ***
  402.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  403.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  404.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  405.  
  406.     // *** IExchExtMessageEvents methods ***
  407.     STDMETHOD(OnRead)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  408.     STDMETHOD(OnReadComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  409.                               ULONG ulFlags) PURE;
  410.     STDMETHOD(OnWrite)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  411.     STDMETHOD(OnWriteComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  412.                                ULONG ulFlags) PURE;
  413.     STDMETHOD(OnCheckNames)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  414.     STDMETHOD(OnCheckNamesComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  415.                                     ULONG ulFlags) PURE;
  416.     STDMETHOD(OnSubmit)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  417.     STDMETHOD_(VOID, OnSubmitComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  418.                                        ULONG ulFlags) PURE;
  419. };
  420. typedef IExchExtMessageEvents FAR * LPEXCHEXTMESSAGEEVENTS;
  421.  
  422.  
  423. /*
  424.  *  IExchExtAttachedFileEvents
  425.  *
  426.  *  Purpose:
  427.  *      Interface implemented by Exchange client extensions that wish to
  428.  *      take special action when certain events happen to attached files.
  429.  */
  430. #undef INTERFACE
  431. #define INTERFACE   IExchExtAttachedFileEvents
  432.  
  433. DECLARE_INTERFACE_(IExchExtAttachedFileEvents, IUnknown)
  434. {
  435.     BEGIN_INTERFACE
  436.  
  437.     // *** IUnknown methods ***
  438.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  439.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  440.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  441.  
  442.     // *** IExchExtAttachedFileEvents methods ***
  443.     STDMETHOD(OnReadPattFromSzFile)(THIS_ LPATTACH lpatt, LPTSTR lpszFile,
  444.                                     ULONG ulFlags) PURE;
  445.     STDMETHOD(OnWritePattToSzFile)(THIS_ LPATTACH lpatt, LPTSTR lpszFile,
  446.                                    ULONG ulFlags) PURE;
  447.     STDMETHOD(QueryDisallowOpenPatt)(THIS_ LPATTACH lpatt) PURE;
  448.     STDMETHOD(OnOpenPatt)(THIS_ LPATTACH lpatt) PURE;
  449.     STDMETHOD(OnOpenSzFile)(THIS_ LPTSTR lpszFile, ULONG ulFlags) PURE;
  450. };
  451. typedef IExchExtAttachedFileEvents FAR * LPEXCHEXTATTACHEDFILEEVENTS;
  452.  
  453.  
  454. /*
  455.  *  IExchExtPropertySheets
  456.  *
  457.  *  Purpose:
  458.  *      Interface implemented by Exchange client extensions that wish
  459.  *      to add additional pages to the client's object property sheets.
  460.  */
  461. #undef INTERFACE
  462. #define INTERFACE   IExchExtPropertySheets
  463.  
  464. DECLARE_INTERFACE_(IExchExtPropertySheets, IUnknown)
  465. {
  466.     BEGIN_INTERFACE
  467.  
  468.     // *** IUnknown methods ***
  469.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  470.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  471.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  472.  
  473.     // *** IExchExtPropertySheet methods ***
  474.     STDMETHOD_(ULONG,GetMaxPageCount) (THIS_ ULONG ulFlags) PURE;
  475.     STDMETHOD(GetPages) (THIS_ LPEXCHEXTCALLBACK lpeecb, ULONG ulFlags,
  476.                          LPPROPSHEETPAGE lppsp, ULONG FAR * lpcpsp) PURE;
  477.     STDMETHOD_(VOID,FreePages) (THIS_ LPPROPSHEETPAGE lppsp, 
  478.                                 ULONG ulFlags, ULONG cpsp) PURE;
  479. };
  480. typedef IExchExtPropertySheets FAR * LPEXCHEXTPROPERTYSHEETS;
  481.  
  482.  
  483. /*
  484.  *  IExchExtAdvancedCriteria
  485.  *
  486.  *  Purpose:
  487.  *      Interface implemented by Exchange client extensions that wish to
  488.  *      implement an advanced criteria dialog.
  489.  */
  490. #undef INTERFACE
  491. #define INTERFACE   IExchExtAdvancedCriteria
  492.  
  493. DECLARE_INTERFACE_(IExchExtAdvancedCriteria, IUnknown)
  494. {
  495.     BEGIN_INTERFACE
  496.  
  497.     // *** IUnknown methods ***
  498.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  499.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  500.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  501.  
  502.     // *** IExchExtAdvancedCriteria methods ***
  503.     STDMETHOD(InstallAdvancedCriteria) (THIS_ HWND hwnd, LPSRestriction lpres, 
  504.                                         BOOL fNot, LPENTRYLIST lpeidl, 
  505.                                         ULONG ulFlags) PURE;
  506.     STDMETHOD(DoDialog) (THIS) PURE;
  507.     STDMETHOD_(VOID,Clear) (THIS) PURE;
  508.     STDMETHOD_(VOID,SetFolders) (THIS_ LPENTRYLIST lpeidl, ULONG ulFlags) PURE;
  509.     STDMETHOD(QueryRestriction) (THIS_ LPVOID lpvAllocBase, 
  510.                                  LPSRestriction FAR * lppres,
  511.                                  LPSPropTagArray FAR * lppPropTags,
  512.                                  LPMAPINAMEID FAR * FAR * lpppPropNames,
  513.                                  BOOL * lpfNot, LPTSTR lpszDesc, ULONG cchDesc, 
  514.                                  ULONG ulFlags) PURE;
  515.     STDMETHOD_(VOID,UninstallAdvancedCriteria) (THIS) PURE;
  516. };
  517. typedef IExchExtAdvancedCriteria FAR * LPEXCHEXTADVANCEDCRITERIA;
  518.  
  519.  
  520. /*
  521.  *  IExchExtModeless
  522.  *
  523.  *  Purpose:
  524.  *      Interface implemented by Exchange client extensions that wish
  525.  *      to create modeless UI.
  526.  */
  527. #undef INTERFACE
  528. #define INTERFACE   IExchExtModeless
  529.  
  530. DECLARE_INTERFACE_(IExchExtModeless, IUnknown)
  531. {
  532.     BEGIN_INTERFACE
  533.  
  534.     // *** IUnknown methods ***
  535.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  536.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  537.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  538.  
  539.     // *** IExchExtModeless methods ***
  540.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG pmsg) PURE;
  541.     STDMETHOD(EnableModeless) (THIS_ BOOL fEnable) PURE;
  542. };
  543.  
  544.  
  545. /*
  546.  *  G U I D s
  547.  */
  548.  
  549.  
  550. #define DEFINE_EXCHEXTGUID(name, b) \
  551.     DEFINE_GUID(name, 0x00020D00 | (b), 0, 0, 0xC0,0,0,0,0,0,0,0x46)
  552.  
  553. #ifndef NOEXCHEXTGUIDS
  554. DEFINE_EXCHEXTGUID(IID_IExchExtCallback,            0x10);
  555. DEFINE_EXCHEXTGUID(IID_IExchExt,                    0x11);
  556. DEFINE_EXCHEXTGUID(IID_IExchExtCommands,            0x12);
  557. DEFINE_EXCHEXTGUID(IID_IExchExtUserEvents,          0x13);
  558. DEFINE_EXCHEXTGUID(IID_IExchExtSessionEvents,       0x14);
  559. DEFINE_EXCHEXTGUID(IID_IExchExtMessageEvents,       0x15);
  560. DEFINE_EXCHEXTGUID(IID_IExchExtAttachedFileEvents,  0x16);
  561. DEFINE_EXCHEXTGUID(IID_IExchExtPropertySheets,      0x17);
  562. DEFINE_EXCHEXTGUID(IID_IExchExtAdvancedCriteria,    0x18);
  563. DEFINE_EXCHEXTGUID(IID_IExchExtModeless,            0x19);
  564. DEFINE_EXCHEXTGUID(IID_IExchExtModelessCallback,    0x1a);
  565. #endif // NOEXCHEXTGUIDS
  566.  
  567.  
  568. /*
  569.  *  C M D I D s
  570.  */
  571.  
  572.  
  573. // File
  574. #define EECMDID_File                                10
  575. #define EECMDID_FileOpen                            11
  576. #define EECMDID_FileSend                            12
  577. #define EECMDID_FileSave                            13
  578. #define EECMDID_FileSaveAs                          14
  579. #define EECMDID_FileMove                            16
  580. #define EECMDID_FileCopy                            17
  581. #define EECMDID_FilePrint                           25
  582. #define EECMDID_FileNewEntry                        18
  583. #define EECMDID_FileNewMessage                      19
  584. #define EECMDID_FileNewFolder                       20
  585. #define EECMDID_FileAddToPAB                        29
  586. #define EECMDID_FileDelete                          21
  587. #define EECMDID_FileRename                          22
  588. #define EECMDID_FileProperties                      23
  589. #define EECMDID_FilePropertiesRecipients            24
  590. #define EECMDID_FileClose                           30
  591. #define EECMDID_FileExit                            32
  592. #define EECMDID_FileExitAndLogOff                   33
  593.  
  594. // Edit
  595. #define EECMDID_Edit                                40
  596. #define EECMDID_EditUndo                            41
  597. #define EECMDID_EditCut                             42
  598. #define EECMDID_EditCopy                            43
  599. #define EECMDID_EditPaste                           44
  600. #define EECMDID_EditPasteSpecial                    45
  601. #define EECMDID_EditSelectAll                       46
  602. #define EECMDID_EditMarkAsRead                      49
  603. #define EECMDID_EditMarkAsUnread                    50
  604. #define EECMDID_EditMarkToRetrieve                  52
  605. #define EECMDID_EditMarkToRetrieveACopy             53
  606. #define EECMDID_EditMarkToDelete                    54
  607. #define EECMDID_EditUnmarkAll                       55
  608. #define EECMDID_EditFind                            56
  609. #define EECMDID_EditReplace                         57
  610. #define EECMDID_EditLinks                           59
  611. #define EECMDID_EditObject                          60
  612. #define EECMDID_EditObjectConvert                   61
  613. #ifdef DBCS
  614. #define EECMDID_EditFullShape                       62
  615. #define EECMDID_EditHiraKataAlpha                   63
  616. #define EECMDID_EditHangAlpha                       64
  617. #define EECMDID_EditHanja                           65
  618. #define EECMDID_EditRoman                           66
  619. #define EECMDID_EditCode                            67  
  620. #endif
  621.  
  622. // View
  623. #define EECMDID_View                                70
  624. #define EECMDID_ViewFolders                         71
  625. #define EECMDID_ViewToolbar                         72
  626. #define EECMDID_ViewFormattingToolbar               73
  627. #define EECMDID_ViewStatusBar                       74
  628. #define EECMDID_ViewNewWindow                       75
  629. #define EECMDID_ViewColumns                         79
  630. #define EECMDID_ViewSort                            78
  631. #define EECMDID_ViewFilter                          80
  632. #define EECMDID_ViewBccBox                          91
  633. #define EECMDID_ViewPrevious                        87
  634. #define EECMDID_ViewNext                            88
  635. #ifdef DBCS                                         
  636. #define EECMDID_ViewWritingMode                     89
  637. #define EECMDID_ViewImeStatus                       94
  638. #endif
  639.                                                     
  640. // Insert                                           
  641. #define EECMDID_Insert                              100
  642. #define EECMDID_InsertFile                          101
  643. #define EECMDID_InsertMessage                       102
  644. #define EECMDID_InsertObject                        103
  645. #define EECMDID_InsertInkObject                     104
  646.                                                     
  647. // Format                                           
  648. #define EECMDID_Format                              110
  649. #define EECMDID_FormatFont                          111
  650. #define EECMDID_FormatParagraph                     112
  651.                                                     
  652. // Tools                                            
  653. #define EECMDID_Tools                               120
  654. #define EECMDID_ToolsDeliverNowUsing                121
  655. #define EECMDID_ToolsDeliverNow                     122
  656. #define EECMDID_ToolsSpelling                       131
  657. #define EECMDID_ToolsAddressBook                    123
  658. #define EECMDID_ToolsCheckNames                     133
  659. #define EECMDID_ToolsFind                           124
  660. #define EECMDID_ToolsConnect                        126
  661. #define EECMDID_ToolsUpdateHeaders                  127
  662. #define EECMDID_ToolsTransferMail                   128
  663. #define EECMDID_ToolsDisconnect                     129
  664. #define EECMDID_ToolsRemoteMail                     130
  665. #define EECMDID_ToolsCustomizeToolbar               134
  666. #define EECMDID_ToolsServices                       135
  667. #define EECMDID_ToolsOptions                        136
  668. #ifdef DBCS                                         
  669. #define EECMDID_ToolsWordRegistration               137
  670. #endif                                              
  671.                                                     
  672. // Compose                                          
  673. #define EECMDID_Compose                             150
  674. #define EECMDID_ComposeNewMessage                   151
  675. #define EECMDID_ComposeReplyToSender                154
  676. #define EECMDID_ComposeReplyToAll                   155
  677. #define EECMDID_ComposeForward                      156
  678.                                                     
  679. // Help
  680. #define EECMDID_Help                                160
  681. #define EECMDID_HelpMicrosoftExchangeHelpTopics     161
  682. #define EECMDID_HelpAboutMicrosoftExchange          162
  683.  
  684. // Header                                           
  685. #define EECMDID_CtxHeader                           203
  686. #define EECMDID_CtxHeaderSortAscending              204
  687. #define EECMDID_CtxHeaderSortDescending             205
  688.                                                     
  689. // In Folder                                        
  690. #define EECMDID_CtxInFolder                         206
  691. #define EECMDID_CtxInFolderChoose                   207
  692.                                                     
  693. // Container                                        
  694. #define EECMDID_CtxContainer                        208
  695. #define EECMDID_CtxContainerProperties              209
  696.  
  697. // Standard Toolbar
  698. #define EECMDID_Toolbar                             220
  699. #define EECMDID_ToolbarPrint                        221
  700. #define EECMDID_ToolbarReadReceipt                  222
  701. #define EECMDID_ToolbarImportanceHigh               223
  702. #define EECMDID_ToolbarImportanceLow                224
  703. #define EECMDID_ToolbarFolderList                   225
  704. #define EECMDID_ToolbarOpenParent                   226
  705. #define EECMDID_ToolbarInbox                        76
  706. #define EECMDID_ToolbarOutbox                       77
  707.  
  708. // Formatting Toolbar
  709. #define EECMDID_Formatting                          230
  710. #define EECMDID_FormattingFont                      231
  711. #define EECMDID_FormattingSize                      232
  712. #define EECMDID_FormattingColor                     233
  713. #define EECMDID_FormattingColorAuto                 234
  714. #define EECMDID_FormattingColor1                    235
  715. #define EECMDID_FormattingColor2                    236
  716. #define EECMDID_FormattingColor3                    237
  717. #define EECMDID_FormattingColor4                    238
  718. #define EECMDID_FormattingColor5                    239
  719. #define EECMDID_FormattingColor6                    240
  720. #define EECMDID_FormattingColor7                    241
  721. #define EECMDID_FormattingColor8                    242
  722. #define EECMDID_FormattingColor9                    243
  723. #define EECMDID_FormattingColor10                   244
  724. #define EECMDID_FormattingColor11                   245
  725. #define EECMDID_FormattingColor12                   246
  726. #define EECMDID_FormattingColor13                   247
  727. #define EECMDID_FormattingColor14                   248
  728. #define EECMDID_FormattingColor15                   249
  729. #define EECMDID_FormattingColor16                   250
  730. #define EECMDID_FormattingBold                      251
  731. #define EECMDID_FormattingItalic                    252
  732. #define EECMDID_FormattingUnderline                 253
  733. #define EECMDID_FormattingBullets                   254
  734. #define EECMDID_FormattingDecreaseIndent            255
  735. #define EECMDID_FormattingIncreaseIndent            256
  736. #define EECMDID_FormattingLeft                      257
  737. #define EECMDID_FormattingCenter                    258
  738. #define EECMDID_FormattingRight                     259
  739.  
  740. // Note accelerators
  741. #define EECMDID_Accel                               270
  742. #define EECMDID_AccelFont                           271
  743. #define EECMDID_AccelSize                           272
  744. #define EECMDID_AccelSizePlus1                      273
  745. #define EECMDID_AccelSizeMinus1                     274
  746. #define EECMDID_AccelBold                           275
  747. #define EECMDID_AccelItalic                         276
  748. #define EECMDID_AccelUnderline                      277
  749. #define EECMDID_AccelLeft                           278
  750. #define EECMDID_AccelCenter                         279
  751. #define EECMDID_AccelRight                          280
  752. #define EECMDID_AccelBullets                        281
  753. #define EECMDID_AccelNoFormatting                   282
  754. #define EECMDID_AccelRepeatFind                     283
  755. #define EECMDID_AccelContextHelp                    284
  756. #define EECMDID_AccelNextWindow                     285
  757. #define EECMDID_AccelPrevWindow                     286
  758. #define EECMDID_AccelCtrlTab                        287
  759. #define EECMDID_AccelUndo                           288
  760. #define EECMDID_AccelCut                            289
  761. #define EECMDID_AccelCopy                           290
  762. #define EECMDID_AccelPaste                          291
  763. #define EECMDID_AccelSubject                        292
  764. #define EECMDID_AccelContextHelpOff                 293
  765. #define EECMDID_AccelDecreaseIndent                 294
  766. #define EECMDID_AccelIncreaseIndent                 295
  767. #define EECMDID_AccelColor                          296
  768.  
  769. // Edit.Object
  770. #define EECMDID_ObjectMin                           300
  771. #define EECMDID_ObjectMax                           399
  772.  
  773. // Tools.Remote Mail
  774. #define EECMDID_RemoteMailMin                       600
  775. #define EECMDID_RemoteMailMax                       699
  776.  
  777. // Tools.Deliver Now Using
  778. #define EECMDID_DeliverNowUsingMin                  700
  779. #define EECMDID_DeliverNowUsingMax                  799
  780.  
  781. // Form verbs
  782. #define EECMDID_FormVerbMin                         800
  783. #define EECMDID_FormVerbMax                         899
  784.  
  785. // For backward compatibility with earlier header versions
  786. #define EECMDID_ViewInbox               EECMDID_ToolbarInbox
  787. #define EECMDID_ViewOutbox              EECMDID_ToolbarOutbox
  788. #define EECMDID_ViewItemAbove           EECMDID_ViewPrevious
  789. #define EECMDID_ViewItemBelow           EECMDID_ViewNext
  790. #define EECMDID_ToolsFindItem           EECMDID_ToolsFind
  791. #define EECMDID_HelpUsersGuideContents  EECMDID_HelpMicrosoftExchangeHelpTopics
  792. #define EECMDID_HelpAbout               EECMDID_HelpAboutMicrosoftExchange
  793.  
  794. #ifdef __BORLANDC__
  795. #pragma option -b.
  796.   #include <poppack.h>
  797. #pragma option -b
  798. #endif
  799.  
  800. #pragma option -b.
  801. #endif // EXCHEXT_H
  802.